<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <div id="community">
        <div id="forum-header">
            <?php echo $community_header; ?>
            <div>
                <h1><a href="<?php echo $headline_link; ?>"><?php echo $headline_name; ?></a></h1>
            </div>
        </div>
        <div id="member-profile">
            <dl id="member-profile-header">
                <dd><a href="<?php echo $member_information_link; ?>"<?php echo $navi_mi_active; ?>><?php echo $text_member_information; ?></a>&#124;</dd>
                <dd><a href="<?php echo $topics_link; ?>"<?php echo $navi_t_active; ?>><?php echo $text_topics; ?></a>&#124;</dd>
                <dd><a href="<?php echo $posts_link; ?>"<?php echo $navi_p_active; ?>><?php echo $text_posts; ?></a>&#124;</dd>
            </dl>
            <?php switch($content_type){
                case 'mi': ?>
            <dl id="member-profile-center">
                <dt><strong><?php echo $text_basic_information; ?></strong></dt>
                <dd id="member-profile-avatar">
                    <img src="<?php echo $memberInfo['user_avatar']; ?>" />
                    <?php if($is_user_login){ ?>
                    <br /> <a href="<?php echo $send_pm_link; ?>"><?php echo $text_send_pm; ?></a>
                    <?php } ?>
                </dd>
                <dd><span><?php echo $text_icq; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_icq']; ?></span></dd>
                <dd><span><?php echo $text_aol; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_aim']; ?></span></dd>
                <dd><span><?php echo $text_msn; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_msnm']; ?></span></dd>
                <dd><span><?php echo $text_yahoo; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_yim']; ?></span></dd>
                <dd><span><?php echo $text_jabber; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_jabber']; ?></span></dd>
                <dd><span><?php echo $text_location; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_from']; ?></span></dd>
                <dd><span><?php echo $text_occupation; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_occ']; ?></span></dd>
                <dd><span><?php echo $text_interests; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_interests']; ?></span></dd>
                <dd><span><?php echo $text_age; ?></span><span class="member-profile-content"><?php echo $memberInfo['age']; ?></span></dd>
            </dl>
            <dl id="member-profile-bottom">
                <dt><strong><?php echo $text_user_activity; ?></strong></dt>
                <dd><span><?php echo $text_joined; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_regdate']; ?></span></dd>
                <dd><span><?php echo $text_last_visited; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_lastvisit']; ?></span></dd>
                <dd><span><?php echo $text_last_post; ?></span><span class="member-profile-content"><?php echo $memberInfo['user_lastpost_time']; ?></span></dd>
                <dd><span><?php echo $text_user_rank; ?></span><span class="member-profile-content"><?php echo $memberInfo['rank_title']; ?></span></dd>
                <dd><span><?php echo $text_user_group; ?></span><span class="member-profile-content"><?php echo $memberInfo['role']; ?></span></dd>
                <dd><span><?php echo $text_email_verification; ?></span><span class="member-profile-content"><?php echo $memberInfo['email_verification']; ?></span></dd>
                <dd><span><?php echo $text_user_statics; ?></span><span class="member-profile-content"><?php echo $text_topics; ?>&nbsp;&nbsp;<a href="<?php echo $topic_link; ?>"><?php echo $memberInfo['user_topics']; ?></a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;<?php echo $text_posts; ?>&nbsp;&nbsp;<a href="<?php echo $post_link; ?>"><?php echo $memberInfo['user_posts']; ?></a></span></dd>
            </dl>
            <?php break; ?>
            <?php case 't': ?>
            <dl id="member-profile-topic">
                <dt><span class="topic-title"><?php echo $text_topic; ?></span><span class="topic-forum"><?php echo $text_forum; ?></span><span class="topic-reply"><?php echo $text_replies; ?></span><span class="topic-view"><?php echo $text_views; ?></span><span class="topic-last"><?php echo $text_last_post; ?></span></dt>
                <?php if($has_topics){ ?>
                <?php $i=0; ?>
                <?php foreach($topic_infos as $topic_info){ ?>
                <dd class="<?php echo $topicStatus[$i]; ?>" title="<?php echo $text_topic_status[$i]; ?>"><span class="topic-title"><a href="<?php echo $topic_info['topic_link']; ?>"><?php echo $topic_info['topic_title']; ?></a><br /><?php echo $topic_info['topic_time']; ?></span><span class="topic-forum"><a href="<?php echo $topic_info['forum_link']; ?>"><?php echo $topic_info['forum_name']; ?></a></span><span class="topic-reply"><?php echo $topic_info['topic_replies']; ?></span><span class="topic-view"><?php echo $topic_info['topic_views']; ?></span><span class="topic-last"><?php echo $text_by; ?>&nbsp;<a href="<?php echo $topic_info['member_link']; ?>"><?php echo $topic_info['topic_last_poster_name']; ?></a><br /><?php echo $topic_info['topic_last_post_time']; ?></span></dd>
                <?php $i++; ?>
                <?php } ?>
                <?php }else{ ?>
                <dd><?php echo $text_no_topics; ?></dd>
                <?php } ?>
            </dl>
            <div class="forum-pagination"><?php echo $pagination; ?></div>
            <script type="text/javascript"><!--
            $(document).ready(
                function(){
                    $("#member-profile-topic dd").filter(":even").mouseover(function() {
                        $(this).css("background-color", "#FFFFDB");
                    }).mouseout(function(){
                            $(this).css("background-color", "");
                        });

                    $("#member-profile-topic dd").filter(":odd").mouseover(function() {
                        $(this).css("background-color", "#FFFFDB");
                    }).mouseout(function(){
                            $(this).css("background-color", "");
                        });
                });
            //--></script>
            <?php break; ?>
            <?php case 'p': ?>
            <dl id="member-profile-post">
                <?php if($has_posts){ ?>
                <?php $i=0; ?>
                <?php foreach($post_infos as $post_info){ ?>
                <dd><span class="post-title"><a href="<?php echo $post_info['post_link']; ?>"><?php echo $post_info['post_subject']; ?></a></span><span class="post-time"><?php echo $post_info['post_time']; ?></span><br /><span class="post-content"><?php echo $post_info['post_text']; ?></span></dd>
                <?php $i++; ?>
                <?php } ?>
                <?php }else{ ?>
                <dd><?php echo $text_no_posts; ?></dd>
                <?php } ?>
            </dl>
            <div class="forum-pagination"><?php echo $pagination; ?></div>
            <script type="text/javascript"><!--
            $(document).ready(
                function(){
                    $("#member-profile-post dd").filter(":even").mouseover(function() {
                        $(this).css("background-color", "#FFFFDB");
                    }).mouseout(function(){
                            $(this).css("background-color", "");
                        });

                    $("#member-profile-post dd").filter(":odd").mouseover(function() {
                        $(this).css("background-color", "#FFFFDB");
                    }).mouseout(function(){
                            $(this).css("background-color", "");
                        });
                });
            //--></script>
            <?php break; ?>
        <?php } ?>
        </div>
    </div>
<?php  echo $footer; ?>
<script type="text/javascript"><!--
$(document).ready(
    function(){
        $(".forum-content").filter(":even").mouseover(function() {
            $(this).css("background-color", "#FFFFDB");
        }).mouseout(function(){
                $(this).css("background-color", "");
            });

        $(".forum-content").filter(":odd").mouseover(function() {
            $(this).css("background-color", "#FFFFDB");
        }).mouseout(function(){
                $(this).css("background-color", "");
            });
    });

$('#community input[name=\'header-keyword\']').keydown(function(e) {
    if (e.keyCode == 13) {
        $('#header-search-button').trigger('click');
    }
});

$('#header-search-button').bind('click', function() {
    url = 'index.php?route=community/search';

    var keyword = $('#forum-header-bar-search input[name=\'header-keyword\']').attr('value');

    url += '&kw=' + encodeURIComponent(keyword) + '&sw=psm&sb=lpt&or=desc&lr=all';

    location = url;
});
//--></script>
<script type="text/javascript" src="catalog/view/javascript/forum_fn.js"></script>